package com.open.order.service.impl;

import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.open.order.entity.OrderEntity;
import com.open.order.mapper.OrderMapper;
import com.open.order.resp.OrderDTO;
import com.open.order.service.OrderService;

@Service
public class OrderServiceImpl extends ServiceImpl<OrderMapper, OrderEntity> 
	implements OrderService {

	@Override
	public OrderDTO getOrderById(Integer id) {
		OrderEntity orderEntity = this.getById(id);
		OrderDTO dto = new OrderDTO();
		BeanUtils.copyProperties(orderEntity, dto);
		return dto;
	}
	
	

}
